import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useVulnerabilityStore = defineStore('vulnerability', () => {
  const vulnerabilityList = ref([])
  const loading = ref(false)
  
  const fetchVulnerabilityList = async (params) => {
    loading.value = true
    try {
      // TODO: 实现获取漏洞列表的API调用
      loading.value = false
    } catch (error) {
      console.error('获取漏洞列表失败:', error)
      loading.value = false
    }
  }
  
  return {
    vulnerabilityList,
    loading,
    fetchVulnerabilityList
  }
})